const o = {};
const p = Object.defineProperties(o, {
  x: { value: 1, writable: true, enumerable: true, configurable: true },
  y: { value: 1, writable: true, enumerable: true, configurable: true },
  r: {
    get() {
      return Math.sqrt(this.x * this.x + this.y * this.y);
    },
    enumerable: true,
    configurable: true,
  },
});
console.log(p.r); // 1.4142135623730951
console.log(o === p); // true
